<!-- MAIN -->
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" ng-init="init()">
    <h1 class="page-header">菜品管理界面</h1>
    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
                <tr>
                    <th ng-click="orderByX('_id')">菜品ID</th>
                    <th ng-click="orderByX('foodName')">菜品名称</th>
                    <th ng-click="orderByX('foodPrice')">菜品价格</th>
                    <th>菜品图片</th>
                    <th ng-click="orderByX('foodType')">菜品类型</th>
                    <th>编辑菜品</th>
                    <th>删除菜品</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="food in foods | orderBy:orderBy | filter:search">
                    <td>{{food._id}}</td>
                    <td>{{food.foodName}}</td>
                    <td>{{food.foodPrice}}</td>
                    <td><img class='img-thumbnail' src="{{food.foodPic}}" width=150px height=120px/></td>
                    <td>{{food.foodType}}</td>
                    <td>
                        <button class='btn btn-primary' ng-click="edit(food._id)" data-toggle='modal' data-target='#updateModal'>UPDATE</button>
                    </td>
                    <td>
                        <button class='btn btn-primary' ng-click="delete(food._id)">DELETE</button>
                    </td>
                </tr>
            </tbody>
        </table>
        <button class="btn btn-primary" ng-click="add()">新增菜品</button>
    </div>
</div>
<!-- END MAIN -->